package com.dh.blog.controllers;


import java.util.List;
import java.util.Properties;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.dh.blog.service.ClassifyService;
import com.dh.blog.vo.ClassifyVo;
import com.ewei.web.common.response.ResponseVO;
/**
 * 类别控制器
 * @author David
 *
 */
@RequestMapping("/classify")
@Controller
public class ClassifyController {
	@Resource(name="classifyService")
	private ClassifyService classifyService;
	/**
	 * 显示博客内文章类别
	 */
	@RequestMapping("/view/{blog_id:\\w+}")
	@ResponseBody
	public Object viewByBlog(@PathVariable("blog_id")String blogId){
		List<ClassifyVo> list = classifyService.listAllByBlog(blogId);
		return new ResponseVO().setDatas(list);
	}
}
